home *** CD-ROM | disk | FTP | other *** search
/ Adventures with Oslo: Tools & Gadgets / Adventures with Oslo - Tools and Gadgets.ISO / mac / Ad / Mod04 / forceps / 00061.ls < prev    next >
Encoding:
Text File  |  1994-09-23  |  781 b   |  25 lines

  1. on startMovie
  2.   global gBackPack
  3.   set HC to the number of cast "handCursor"
  4.   cursor([HC, HC + 1])
  5.   if getOne(gBackPack, #vmap) = 0 then
  6.     set the visible of sprite 45 to 0
  7.   end if
  8.   set GC to the number of cast "grabber"
  9.   set the cursor of sprite 16 to [GC, GC + 1]
  10. end
  11.  
  12. on mouseUp
  13.   if the castNum of sprite the clickOn = the number of cast "forceps" then
  14.     set horiz to the locH of sprite the clickOn
  15.     set vert to the locV of sprite the clickOn
  16.     set snapH to integer(word 1 of field "spriteLoc")
  17.     set snapV to integer(word 2 of field "spriteLoc")
  18.     if (abs(horiz - snapH) < 10) and (abs(vert - snapV) < 10) then
  19.       set the locH of sprite the clickOn to snapH
  20.       set the locV of sprite the clickOn to snapV
  21.       go(1, "finroom")
  22.     end if
  23.   end if
  24. end
  25.